package com.sky.service.impl;

import com.sky.entity.Setmeal;
import com.sky.mapper.UserSetmealMapper;
import com.sky.service.UserSetmealService;
import com.sky.vo.DishItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserSetmealServiceImpl implements UserSetmealService {
@Autowired
private UserSetmealMapper userSetmealMapper;
    @Override
    public List<Setmeal> findByid(Integer categoryId) {
        List<Setmeal> byid = userSetmealMapper.findByid(categoryId);
        return byid;
    }

    @Override
    public List<DishItemVO> findDish(Long id) {
        //在套餐菜品关系表中根据id查找菜品id
        List<DishItemVO> dish = userSetmealMapper.findDish(id);
        return dish;
    }
}
